home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMIBEST1.ADF
/
AmigaBasicStuff
/
FutureSound
/
Example.DOC
< prev
next >
Wrap
Text File
|
1987-07-22
|
3KB
|
74 lines
Interfacing Amiga Basic Programs with FutureSound sounds
--------------------------------------------------------
The Amiga Basic program 'Example' is an example of using FutureSound
sampled sound files in an Amiga Basic program.
The keys to the interface between the FutureSound routines and Amiga
Basic are the files 'future.library', 'future.bmap' and 'exec.bmap'.
These files must be present when your program is executed. They can
be in the same directory (or drawer) where you run your Amiga Basic
programs.
If you are using FutureSound files in your Amiga Basic programs
alot, then copy the 'future.library' file to the LIBS: directory.
This directory is called 'libs' on your Workbench disk.
In the CLI, type:
COPY DF1:BasicDemos/future.library LIBS:
Depending on your system set-up, this command may be different.
Both '.bmap' files must be present in the directory where you are
running you Amiga Basic program. The '.bmap' files coordinate
the interface between Amiga Basic and the 'future.library'.
The source code to Example is included at the end of this text.
It is nearly self-documenting. :-)
'future.library' Example AmigaDOS library
'future.library' is an AmigaDOS library composed of some interface
assembly language code, and the FutureSound C routines supplied
on this disk.
The complete source to the 'future.library' is included. If you
have the Metacomco assembler and the Lattice C compiler, you can
modify the 'future.library' to suit your needs.
The example Lattice C functions were converted to use only AmigaDOS
level input and output, i.e., 'Open()' instead of 'fopen()'.
Also, all references to 'stdin' and 'stdout' I/O were removed.
The functions were compiled with stack checking off, using the '-v'
option in the 'lc2' pass of the compiler.
Also, the Lattice 'strcmp()' function was replaced with an equivalent
function.
The functions were linked only with 'amiga.lib', not 'lc.lib'.
The functions do not need any startup code. '_DOSBase' and '_SysBase'
were resolved in the 'future.asm' code, the core of the library.
These were the only unresolved references. The 'future.asm' file
contains more details of the interface between C and assembler.
These changes produce nearly stand-alone C functions, a necessity
for inclusion in an AmigaDOS library.
Example assemble, compile and link files are included.
----------------------------------------------------------------
(c) Copyright 1986, Applied Visions, 15 Oak Ridge Road, Medford,
Mass. 02155 (617) 488-3602.
Text, examples, and library interface by John Foust.